package com.shujia.mr.partition;

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

public class MyPartitionReducer extends Reducer<Text,Student, NullWritable,Student> {
    @Override
    protected void reduce(Text key, Iterable<Student> values, Reducer<Text, Student, NullWritable, Student>.Context context) throws IOException, InterruptedException {
        for (Student student : values) {
            context.write(NullWritable.get(),student);
        }
    }
}
